package com.spider.thisdemo;

public class Student {
    String name;
    public void print1(){
        //this是一个变量，它表示当前对象，this.name表示当前对象的name属性
        System.out.println(this);

    }
    //构造器
    public Student(String name){
        this.name= name;
    }
    public Student(){
    }
    //
    public void printHobby(String name){
        System.out.println(this.name+name);
    }
}
